<template>
  <div class="shopping">
    <div class="header border-topbottom">
      <router-link to="/vacation">
        <div class="iconfont back-icon">&#xe607;</div>
      </router-link>
      <div class="header-center">购物车</div>
      <div class="edit" @click="handleEdit">{{edit}}</div>
    </div>
    <div class="cart">
      <img class="images" src="//s.qunarzz.com/vacation_rn/camel.png" />
      <div class="cart-desc">这儿还什么都没有哦~~</div>
      <router-link to="/vacation">
        <div class="gotoshopping">去逛逛</div>
      </router-link>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      edit: "编辑",
      completed: true
    };
  },
  methods: {
    handleEdit() {
      if (this.completed) {
        this.edit = "编辑";
        this.completed = false;
      } else {
        this.edit = "完成";
        this.completed = true;
      }
    }
  }
};
</script>
<style lang="stylus" scoped>
@import '~styles/varibles.styl';

.border-topbottom {
  &:after {
    border-color: #696969;
  }
}

.shopping {
  overflow: hidden;
  background: #f0f0f0;
}

.header {
  height: 1rem;
  background: #fff;
  display: flex;
}

.back-icon {
  width: 1rem;
  height: 1rem;
  text-align: center;
  line-height: 1rem;
  font-size: 0.48rem;
  color: $bgColor;
  font-weight: bold;
}

.header-center {
  width: 5rem;
  height: 1rem;
  font-size: 0.34rem;
  color: #000;
  text-align: center;
  line-height: 1rem;
  flex-direction: column;
  justify-content: space-between;
}

.edit {
  text-align: center;
  line-height: 1rem;
  font-size: 0.36rem;
  color: $bgColor;
  font-weight: bold;
}

.cart {
  width: 100%;
  height: 12.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.images {
  width: 2rem;
  height: 1.6rem;
  padding-top: 0.1rem;
}

.cart-desc {
  width: 100%;
  height: 0.48rem;
  text-align: center;
  line-height: 0.48rem;
  padding: 0.1rem 0 0.1rem 0;
}

.gotoshopping {
  width: 2.04rem;
  height: 0.76rem;
  text-align: center;
  line-height: 0.76rem;
  border: 1px solid $bgColor;
  border-radius: 1.02rem;
  margin-top: 0.2rem;
}
</style>